package com.zjq.smartdevice.mapper;

import com.zjq.smartdevice.pojo.SysDevice;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @User zhangjiaqi
 * @Project project
 * @Package com.zjq.smartdevice.mapper
 * @Date 2022/3/23 20:32
 */
public interface SysDeviceMapper {

    @Insert("insert into sys_device (device_id,device_name,categy_id,bind_user_id,scene_id,bind_time) values (#{deviceId},#{deviceName},#{categyId},#{bindUserId},#{sceneId},#{bindTime})")
    void addSysDevice(SysDevice sysDevice);

    @Select("select * from sys_device where device_id=#{deviceId}")
    SysDevice findById(String deviceId);

    int updateDeviceById(SysDevice sysDevice);

    List<SysDevice> findAll(SysDevice sysDevice);
}
